package com.javasea.netty.har.server;

import com.javasea.netty.har.server.netty.PrinterServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
@SpringBootApplication(scanBasePackages = {"com.javasea.netty.har"})
public class ChatServerAPPlication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ChatServerAPPlication.class, args);
        PrinterServer printerServer = context.getBean(PrinterServer.class);
        try {
            printerServer.bind();
        } catch (Exception e) {
            log.error("启动打印服务异常！", e);
        }
    }
}
